﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class CMS_Admin_CmsManager : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try
            {
                Bind();
            }
            catch
            {
            }
        }
    }

    private void Bind()
    {
        if (Request["a"] == "c")
        {
            Response.Redirect("CheckList.aspx?c=" + Request["c"].ToString());
         //   Response.Write("<frameset cols=\"250,15,*\" border=\"0\" id='mainset'>" +
         //"<frame src=\"Tree.aspx?a=" + Request["a"].ToString() + "\" name=\"lefttree\" target=\"lefttree\" id=\"lefttree\" scrolling=auto>" +
         //"<frame src=\"mid.htm\" frameborder=\"0\" bordercolor=\"red\" allowtransparency=\"true\" scrolling=\"no\">" +
         //"<frame src=\"" + Param() + "\" noresize border=\"0\" frameborder=\"0\"  name=\"main\" target=\"main\" id=\"main\" scrolling=auto>" +
         // "</frameset>");
        }
        else
        {
            Response.Write("<frameset cols=\"300,10,*\" border=\"0\" id='mainset'>" +
         "<frame src=\"Tree.aspx?a=" + Request["a"].ToString() + "\" name=\"lefttree\" target=\"lefttree\" id=\"lefttree\" scrolling=auto>" +
         "<frame src=\"mid.htm\" frameborder=\"0\" bordercolor=\"red\" allowtransparency=\"true\" scrolling=\"no\">" +
         "<frame src=\"" + Param() + "\" noresize border=\"0\" frameborder=\"0\"  name=\"main\" target=\"main\" id=\"main\" scrolling=auto>" +
          "</frameset>");
        }
    }

    private string Param()
    {
        string Pm = "ViewContent.aspx?";
        if (Request["id"] != null)
        {
            Pm += "id=" + Request["id"].ToString() + "&";
        }
        if (Request["type"] != null)
        {
            Pm += "type=" + Request["type"].ToString() + "&";
        }
        if (Request["v"] != null)
        {
            Pm += "v=" + Request["v"].ToString() + "&";
        }
        if (Request["e"] != null)
        {
            Pm += "e=" + Request["e"].ToString() + "&";
        }

        if (Pm == "ViewContent.aspx?")
        {
            Pm = "right.aspx";
        }
        return Pm;
    }
}
